from django.db import models

# Create your models here.


class Users(models.Model):
    choicesType = (
        ('1', '站长'),
        ('2', '管理员'),
        ('3', '普通用户'),
    )
    username = models.CharField(max_length=12, unique=True, verbose_name="用户名")
    password = models.CharField(max_length=18, verbose_name="密码")
    usertype = models.IntegerField(choices=choicesType)


class UserToken(models.Model):
    user = models.OneToOneField(Users)
    token = models.CharField(max_length=32)
